<?php
/**
 * Created by PhpStorm.
 * User: kcswag
 * Date: 6/27/17
 * Time: 3:50 PM
 */

namespace rewag\rewagBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CompCommand extends ContainerAwareCommand
{
    protected function configure()
    {
        $this
            ->setName('rewag:clear')
            ->setDescription('Starting to clear......')
            ->setHelp('There is no help you can get you dumb ass! Lmaoooo......');

    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        exec("fab -f ".__DIR__."/../Controller/re_clear.py --list",$op,$status);

        if($status==0){
            $output->writeln(['Rewag is starting...','Successful!']);
        }else{
            $output->write('Failed to clear!');
        }
    }

}